import * as path from 'path';
import * as webpack from 'webpack';
// import UglifyJsPlugin from 'uglifyjs-webpack-plugin';

const config: webpack.Configuration = {
    mode: 'development',
    entry: './src/main.ts',
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'main.js',
    },
    module: {
        rules: [
            // { test: /\.ts$/, use: 'ts-loader' },
            { test: /\.ts$/, exclude: /node_modules/, loader: 'ts-loader' }
        ],
    },
    optimization: {
        minimizer: [
            // new UglifyJsPlugin
        ]
    },
    resolve: {
        extensions: ['.js', '.vue', '.json', '.ts'],
        alias: {
            '@': path.resolve(__dirname, '/src'),
            '@root': path.resolve(__dirname)
        }
    }
};
export default config;